home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / disasm.zip / KILCOLOR.DOC < prev    next >
Text File  |  1988-06-03  |  3KB  |  44 lines

  1.      This procedure is for those people who are using a black- and-white monitor
  2. with the IBM Color/Graphics adapter.  For most of us in this situation, the
  3. reason was not necessarily because we wanted color graphics, but because the
  4. monochrome adapter will work only with the IBM monochrome display.  Anyone who
  5. already owned a BW monitor, or who just didn't want to pay the price for the IBM
  6. monochrome, had no choice but to purchase the color card. I wasn't as infuriated
  7. by this as I thought I would be, since I realized that if I ever wanted graphics
  8. in the future, I would have to get one anyway.  The problem is that many of the
  9. software packages assume that if you have the color adapter, you have a color
  10. monitor connected to it.  Therefore they automatically set mode to color,
  11. causing a terrible display with unreadable text. Fortunately, many of the
  12. packages ask you whether you want color or not, or at least provide a method of
  13. changing the default. However, to defend myself from the sloppier programmers
  14. who make their program almost useless by giving me an unreadable display, I
  15. wrote the following program to disable color entirely.  Even if the program sets
  16. mode to color, the request is changed to black and write. The program is an
  17. interrupt routine that intercepts and modifies calls to the set mode routine of
  18. the video I/O package in ROM.  When executed, it replaces the current video I/O
  19. vector with itself.  When the application program issues a video set mode
  20. interrupt, the intercept routine receives it and changes any requests for color
  21. to the equivalent BW mode.  After modifying the mode, the program branches to
  22. the original interrupt vector address, which it has saved.  For set-modes to
  23. black and white, or for functions other than set mode, the routine branches to
  24. the original routine without changing anything. This technique causes no
  25. permanent damage.  The intercept routine goes away the next time the system is
  26. booted.  If and when you ever get a color monitor, just stop using the program.
  27. It can be added to AUTOEXEC.BAT, so that it is always active. I have included
  28. assembly language source for two different versions of the program, one for DOS
  29. 1.1 and another for 2.0. Logically they are identical, but the DOS 2.0 version
  30. is slightly smaller, utilizing a new function call to get the current inter-
  31. rupt vector.  This function call didn't exist under 1.1, so it has to be done
  32. manually.  Microsoft recommends using this new function call.  If you have 2.0,
  33. use that version.
  34.  
  35. Note: the file kilcolor.com is the 1.1 version; kilcolr2 is the 2.0 version.
  36.  
  37. Wayne Sewell
  38. 3822 Hillsdale Lane
  39. Garland, TX 75042
  40.  
  41. Source STA123
  42.  
  43. P.S.  This appeared in the *.* column of last month's PC World.
  44.